#include <iostream>
#include <unordered_map>
using namespace std;
typedef long long LL;
typedef pair<int, int> PII;
const int mod = 1e9 + 7;

unordered_map<int, int> primes;

int main()
{
    int n;
    cin >> n;
    while (n--)
    {
        int a;
        cin >> a;
        for (int i = 2; i <= a / i; ++i)
        {
            while (a % i == 0)
            {
                a /= i;
                primes[i]++;
            }
        }
        if (a != 1)
            primes[a]++;
    }
    LL ret = 1;
    for (auto &e : primes)
    {
        LL sum = 1;
        int t = e.first, cnt = e.second;
        for (int i = 1; i <= cnt; ++i)
        {
            sum = (sum * t) % mod + 1;
        }
        ret = ret * sum % mod;
    }
    cout << ret << endl;
    return 0;
}
